package com.hotel.comm.bean.company;

import com.hotel.comm.bean.EnumConstants.*;
import com.hotel.comm.bean.system.EjobCity;
import com.hotel.comm.bean.system.EjobIndustry;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 公司职位信息表
 *
 * @author XuSemon
 * @date 2015-4-22
 */
@Entity
@Table(name = "tt_ejob_company_position")
public class EjobCompanyPosition implements Serializable {
    /**
     *
     */
    private static final long serialVersionUID = 3193284310285132L;
    @Id
    @GeneratedValue
    private Long id;
    /**
     * 职位名称
     */
    @Column(name = "position_name")
    private String positionName;
    /**
     * 职位类型
     */
    @Column(name = "position_type")
    @Enumerated(EnumType.STRING)
    private PositionType positionType;
    /**
     * 工作年限
     */
    @Column(name = "working_life")
    @Enumerated(EnumType.STRING)
    private WorkingLife workingLife;
    /**
     * 招聘人数
     */
    @Column(name = "recruit_num")
    private String recruitNum;
    /**
     * 职位所属企业
     */
    @ManyToOne
    @JoinColumn(name = "company_id")
    private EjobCompany ejobCompany;
    /**
     * 职位薪水下限
     */
    @Column(name = "salary_low")
    private Integer salaryLow;
    /**
     * 职位薪水上限
     */
    @Column(name = "salary_hight")
    private Integer salaryHight;
    /**
     * 职位所属部门
     */
    @ManyToOne
    @JoinColumn(name = "department_id")
    private EjobDepartment ejobDepartment;

    /**
     * 职位所在城市
     */
    @ManyToOne
    @JoinColumn(name = "city_id")
    private EjobCity ejobCity;
    /**
     * 学历要求
     */
    @Column(name = "education_requirements")
    @Enumerated(EnumType.STRING)
    private EducationRequirements educationRequirements;
    /**
     * 是否上线<br/>
     * 职位修改必须在下线状态才能修改
     */
    @Column(name = "is_online")
    @Enumerated(EnumType.STRING)
    private IsOnline isOnline;
    /**
     * 是否置顶
     */
    @Column(name = "is_top")
    @Enumerated(EnumType.STRING)
    private IsTop isTop;
    /**
     * 操作员
     */
    @Column(name = "operator_id")
    private Long operatorId;
    /**
     * 创建时间
     */
    @Column(name = "create_date")
    @Temporal(TemporalType.TIMESTAMP)
    private Date createDate;
    /**
     * 更新时间
     */
    @Column(name = "update_date")
    @Temporal(TemporalType.TIMESTAMP)
    private Date updateDate;
    /**
     * 刷新日期<br>
     * 初始化创建时，刷新日期为创建日期<br/>
     * 更新后，刷新日期为上线时的日期(更新需先下线)<br>
     * 企业刷新后，同时更新发布的职位日期
     */
    @Column(name = "reflesh_date")
    @Temporal(TemporalType.TIMESTAMP)
    private Date refleshDate;

    /**
     * 性别要求
     */
    @Column(name = "sex_required")
    @Enumerated(EnumType.STRING)
    private SexRequired sexRequired;

    /**
     * 语言要求
     */
    @Column(name = "language_required")
    private String languageRequired;

    /**
     * 专业要求
     */
    @Column(name = "profession_required")
    private String professionRequired;

    /**
     * 下属人数
     */
    @Column(name = "manage_person_num")
    private Integer managePersonNum;

    /**
     * 汇报对象
     */
    @Column(name = "report_to")
    private String reportTo;

    /**
     * 职位描述
     */
    @Column(name = "job_desc", columnDefinition = "text")
    private String jobDesc;

    /**
     * 职位所属行业
     */
    @ManyToOne
    @JoinColumn(name = "industry_id")
    private EjobIndustry ejobIndustry;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public EjobIndustry getEjobIndustry() {
        return ejobIndustry;
    }

    public void setEjobIndustry(EjobIndustry ejobIndustry) {
        this.ejobIndustry = ejobIndustry;
    }

    public SexRequired getSexRequired() {
        return sexRequired;
    }

    public void setSexRequired(SexRequired sexRequired) {
        this.sexRequired = sexRequired;
    }

    public String getLanguageRequired() {
        return languageRequired;
    }

    public void setLanguageRequired(String languageRequired) {
        this.languageRequired = languageRequired;
    }

    public String getProfessionRequired() {
        return professionRequired;
    }

    public void setProfessionRequired(String professionRequired) {
        this.professionRequired = professionRequired;
    }

    public Integer getManagePersonNum() {
        return managePersonNum;
    }

    public void setManagePersonNum(Integer managePersonNum) {
        this.managePersonNum = managePersonNum;
    }

    public String getReportTo() {
        return reportTo;
    }

    public void setReportTo(String reportTo) {
        this.reportTo = reportTo;
    }

    public String getJobDesc() {
        return jobDesc;
    }

    public void setJobDesc(String jobDesc) {
        this.jobDesc = jobDesc;
    }

    public String getPositionName() {
        return positionName;
    }

    public void setPositionName(String positionName) {
        this.positionName = positionName;
    }

    public PositionType getPositionType() {
        return positionType;
    }

    public void setPositionType(PositionType positionType) {
        this.positionType = positionType;
    }

    public WorkingLife getWorkingLife() {
        return workingLife;
    }

    public void setWorkingLife(WorkingLife workingLife) {
        this.workingLife = workingLife;
    }

    public String getRecruitNum() {
        return recruitNum;
    }

    public void setRecruitNum(String recruitNum) {
        this.recruitNum = recruitNum;
    }

    public Integer getSalaryLow() {
        return salaryLow;
    }

    public void setSalaryLow(Integer salaryLow) {
        this.salaryLow = salaryLow;
    }

    public Integer getSalaryHight() {
        return salaryHight;
    }

    public void setSalaryHight(Integer salaryHight) {
        this.salaryHight = salaryHight;
    }

    public EducationRequirements getEducationRequirements() {
        return educationRequirements;
    }

    public void setEducationRequirements(EducationRequirements educationRequirements) {
        this.educationRequirements = educationRequirements;
    }

    public IsOnline getIsOnline() {
        return isOnline;
    }

    public void setIsOnline(IsOnline isOnline) {
        this.isOnline = isOnline;
    }

    public IsTop getIsTop() {
        return isTop;
    }

    public void setIsTop(IsTop isTop) {
        this.isTop = isTop;
    }

    public Long getOperatorId() {
        return operatorId;
    }

    public void setOperatorId(Long operatorId) {
        this.operatorId = operatorId;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public Date getRefleshDate() {
        return refleshDate;
    }

    public void setRefleshDate(Date refleshDate) {
        this.refleshDate = refleshDate;
    }

    public EjobCompany getEjobCompany() {
        return ejobCompany;
    }

    public void setEjobCompany(EjobCompany ejobCompany) {
        this.ejobCompany = ejobCompany;
    }

    public EjobDepartment getEjobDepartment() {
        return ejobDepartment;
    }

    public void setEjobDepartment(EjobDepartment ejobDepartment) {
        this.ejobDepartment = ejobDepartment;
    }

    public EjobCity getEjobCity() {
        return ejobCity;
    }

    public void setEjobCity(EjobCity ejobCity) {
        this.ejobCity = ejobCity;
    }
    /*	@Override
    public String toString(){
		return new GsonBuilder().create().toJson(this);
	}*/
}
